import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * Created with Intellij IDEA.
 * Description:
 * User:Lenovo
 * Date:2024-12-11
 * Time:16:23
 */
public class Text {
    public static void main(String[] args) {
        int n = 5;
        List<List<Integer>> list = new ArrayList<>();
        List<Integer> row = new ArrayList<>();
        row.add(1);
        list.add(row);
        for (int i = 1; i < n; i++) {
            List<Integer> row2 = new ArrayList<>();
            row2.add(1);
            for (int j = 1; j < i; j++) {
                row2.add(list.get(i-1).get(j-1)+list.get(i-1).get(j));
            }
            row2.add(1);
            list.add(row2);
        }
        for (int i = 0; i < n; i++) {
            System.out.println(list.get(i).toString());
        }
    }
}
